Part Number Hot Search : 
3266P202 LA2610 BBF2812H EMV39T TC74LCX D1121 MLL3035B PA190
Product Description
Full Text Search
 

To Download AF512UDI Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  revision 3.3 atp industrial grade micro sd card specification atp industrial gra de micro sd c ard specification AF512UDI - 5acxx af1gudi - 5acxx af2gudi - 5acxx af4gudi - 5abxx revision 3.3 y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 1 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification disclaimer: a tp electronics inc. shall not be liable for any errors or omissions that may appear in this document, and d isclaims responsibility for any consequences resulting from the use of the information set forth herein. the information in this manual is subject to change without notice. atp general policy does not recommend the use of its products in life support app lications where in a failure or malfunction of the product may directly threaten life or injury. all parts of the atp documentation are protected by copyright law and all rights are reserved. this documentation may not, in whole or in part, be copied, pho tocopied, reproduced, translated, or reduced to any electronic medium or machine - readable form without prior consent, in writing, from atp corporation. the information set forth in this document is considered to be ?proprietary? and ?confidential? propert y owned by atp. revision history date version changes compared to previous issue jan . 2 5 t h , 20 11 2 .0 - base version feb. 23 rd , 2011 2.1 - update p/n may 31 st , 2011 2.2 - add density 8gb - update performance - revise operating current / standby curr ent jul . 11 th , 2011 2.3 - update performance aug. 5 th , 2011 2.4 - upda te environment specification mar . 13 th , 2012 3.0 - n ew features: global wear l eveling algorithm , staticdatarefresh and sd life m onitor tool - add tbw (total bytes written) information mar. 29 th , 2012 3.1 - add spi mode information in chapter 7 aug. 6 th , 2012 3.2 - update AF512UDI - 5acxx sep. 20 th , 2012 3.3 - product line up AF512UDI - 5acxx, af1gudi - 5acxx, af2gudi - 5acxx af4gudi - 5abxx - update data retention information y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 2 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification table of c ontents 1 atp industrial grade microsd /microsdhc card overview ................................................... 5 1.1 atp product availability ........................................................................................................................5 1.2 main features ..........................................................................................................................................6 1.3 application ..............................................................................................................................................6 2 product specifications .................................................................................................................... 7 2.1 environment specifications ....................................................................................................................7 2.2 reliability ................................................................................................................................................8 2.3 data retention .........................................................................................................................................9 2.4 performance ............................................................................................................................................9 2.5 electrical characteristics .......................................................................................................................10 2.6 extra features .......................................................................................................................................10 2.7 global wear leveling - longer life expectancy ..................................................................................11 2.8 staticdatarefresh technology ? ensure data integrity ........................................................................11 2.9 s d life monitoring tool ? lifespan check ..........................................................................................12 2.10 physical dimension (units in mm) ......................................................................................................13 2.11 mec hanical f orm f actor (units in mm) ...............................................................................................14 3 electrical characteristics ............................................................................................................. 17 3.1 dc characteristics ................................................................................................................................17 3.2 ac characteristics ................................................................................................................................18 4 microsd card hardware system ................................................................................................ 22 4.1 microsd card description ....................................................................................................................22 4.2 microsd bus topology .......................................................................................................................23 4.3 microsd card hardware interfa ce ........................................................................................................24 4. 4 bus signal line load ............................................................................................................................25 4.5 hot insertion and removal ...................................................................................................................27 4.6 power up ...............................................................................................................................................27 4.7 compatibility to multi media card .......................................................................................................28 4.8 card capacity ........................................................................................................................................28 5 card registers ............................................................................................................................... 30 5.1 ocr register ........................................................................................................................................30 5.2 cid register .........................................................................................................................................31 5.3 csd register .........................................................................................................................................32 5.4 rca register ........................................................................................................................................37 5.5 scr register .........................................................................................................................................38 5.6 s s r register .........................................................................................................................................40 5.7 cs r register .........................................................................................................................................40 6 mcriosd card functional description ....................................................................................... 42 6.1 mcirosd bus protocol .........................................................................................................................42 6.2 command ..............................................................................................................................................45 6.2.1 command types and format ........................................................................................................................... 45 6.2.2 command classes ............................................................................................................................................ 46 y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 3 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification 6.2.3 detailed command description ....................................................................................................................... 48 6.3 card state transition table ..................................................................................................................55 6.4 responses ..............................................................................................................................................58 6.5 mcirosd card status .............................................................................................................................60 6.5.1 card status ....................................................................................................................................................... 60 6.5.2 mcirosd status ................................................................................................................................................ 64 6.6 card identification mode and data transfer mode ..............................................................................68 6.6.1 card identification mode ................................................................................................................................. 68 6.6.2 data transfer mode ......................................................................................................................................... 76 6.7 error handling ......................................................................................................................................79 6.7.1 e rror c orrection c ode (ecc) .......................................................................................................................... 79 6.7.2 cyclic redundancy check (crc) ................................................................................................................... 79 6.7.3 crc and illegal command .............................................................................................................................. 80 6.7.4 read, write and erase time - out ...................................................................................................................... 80 7 spi mode ........................................................................................................................................ 82 7.1 introduction ...........................................................................................................................................82 7.2 spi bus topology ................................................................................................................................82 7.3 spi bus protocol ...................................................................................................................................83 7.3.1 mode selection and initialization .................................................................................................................... 84 7.3.2 bus transfer protection ................................................................................................................................... 86 7.3.3 data read ......................................................................................................................................................... 86 7.3.4 data write ........................................................................................................................................................ 87 7.3.5 erase & write protect management ................................................................................................................ 88 7.3.6 read cid/csd registers ................................................................................................................................. 89 7.3.7 reset sequence ................................................................................................................................................ 89 y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 4 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification 1 atp industrial grade micro sd /microsdhc card overview 1.1 atp p roduct availability figure 1 - 1: product pictures atp p/n capacity af 512ud i - 5acxx 512mb af 1g udi - 5acxx 1gb af 2g udi - 5 acxx 2gb * af 4g udi - 5ab xx 4gb table 1 - 1: capacities *note: support by project, please contact atp for more information. y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 5 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification 1.2 main features ? compliant with sd specification version 2.0 0 ? supports sd mode , spi mode ? high reliability, operating at - 40 o c to 85 o c ? single level cell (slc) nand flash memory ? water proof, dust proof and esd proof ? sip (system in package) process ? enhanced endurance by global wear leveling algorithm ? saticdatarefresh technology to assure data integrity ? available life monitor t ool to check t he remaining life of microsd card ? enhanced power cycling support ? support bch ecc engine up to 40 bit/1kb yte ? support cprm ? rohs compliant ? ce & fcc certification ? compact form factor : 15mm x 11mm x 1.0mm ? controlled bom ? customized service: adjustable cid reg isters, firmware & setting and label by projects 1.3 application atp industrial grade micro sd /micro sd hc cards are designed for demanding industrial applications, such as handheld computing, military/aerospace, automotive, marine navigation, embedded systems , communication equipment or networking, medical equipment, and automation , where mission - critical data requires the highest level of reliability, durability, and data integrity. y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 6 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification 2 product specifications 2.1 environment specifications type measurement te mperature operat ion - 40 o c to 85 o c non - operat ion - 40 o c to 85 o c humidity operati on 25 o c , 95% relative humidity , non - condensing non - operati on 40 o c , 9 3 % relative humidity , non - condensing vibration test non - operati on 10~2000hz, 6grms, 30mins per axis ben d test non - operati on 10n to the center of the card , 250 cycles, 30 cycles/minute torque test non - operati on 0.15n - m or +/ - 2.5 , 30 cycles/minute, 1000 cycles salt s pray test (mil - std - 883g method1009.8) non - operati on 35 o c , over 85% rh,5% salt concentration, 24 hours solar r adiation test non - operati on 40 o c ,irradiation 1000w/ , 24 hours uv light exposure test (iso 7816 - 1) non - operation 254nm, 15ws/cm2 drop test non - operation 150cm/free fall, total 6 drops table 2 - 1: environment y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 7 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification 2.2 reliabil ity type measurement number of insertions 1 0,000 minimum endurance technology slc nand flash block endurance: 512mb / 4gb : 6 0,000 p/e cycles 1gb / 2gb : 100,000 p/e cycles global wear leveling algorithm tbw (total bytes written) 512mb 6.1 terabyte s random write 12.3 terabytes sequential write 1gb 20 terabytes random write 40 terabytes sequential write 2gb 40 terabytes random write 80 terabytes sequential write 4gb 48 terabytes random write 96 terabytes sequential write mtbf (@ 25 o c ) > 2 ,000,000 hours table 2 - 2 : reliability note: endurance for flash cards can be predicted based on the usage conditions applied to the device, the internal nand flash cycles, the write amplification factor, and the wear l eveling efficiency of the flas h devices. y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 8 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification 2.3 data retention 512mb/ 4gb endurance used number of p/e cycles used (block level) corresponding data retention at 25c use condition 10% p/e cycles 6,000 cycles 10 years 100% p/e cycles 60,000 cycles 1 year 1gb /2gb end urance used number of p/e cycles used (block level) corresponding data retention at 25c use condition 10% p/e cycles 10,000 cycles 10 years 100% p/e cycles 100,000 cycles 1 year table 2 - 3 : data retention note 1: data retention refers to the abilit y of a memory bit to retain its data state over a period of time after the data is written in nand flash regardless of whether the part is powered on or powered off. a data retention failure is when there is at least 1 bit of data that cannot be read or is read incorrectly. note 2: nand flash suppliers refer to jedec jesd47 & jesd22 for data retention testing. based on the information provided by nand flash suppliers, atp targets data retention as above table for reference. 2.4 performance model p/n seq . rea d ( k b/s) seq . write ( k b/s) random read (kb/s) random write (kb/s) af 512 u di - 5acxx 1 9579 1 4998 17 855 5 078 af 1g u di - 5acxx 18858 17017 17123 5393 af 2 g u di - 5acxx 18858 16377 17009 5956 af4gudi - 5abxx 20469 18720 1 8196 6081 note: tested by hdbench 3.40 beta 6 with 40mb file size. the performance may vary depending on the configuration , firmware, setting, application and test environment. table 2 - 4 : performance y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 9 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification 2.5 electrical characteristics type measurement card supported voltage 2.7~3.6v card supported freq uency 0~ 50 mhz data bus width supported 1 or 4 bits table 2 - 5 : electrical characteristics 2.6 extra features : type measurement water proof iec 60529 edition 2.1: 2001 - 02 ? ipx7, below 1000mm water, 30min dust proof iec 60529 edition 2.1: 2001 - 02 ? ip 5 x e sd proof iec 61000 - 4 - 2: contact pad +/ - 4kv, non- contact pad (coupling plane discharge) +/ - 8kv, non - contact pad (air discharge) +/ - 15kv rohs compliant yes type measurement water proof yes dust proof yes esd proof yes table 2 - 6 : extra features formatted: table 1-1 y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 10 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification 2.7 global wear leveling - longer life expectancy the program / erase cycle of each sector/page/block is finite. writing constantly on the same spot will cause the flash to wear out quickly. furthermore, bit errors are not proportioned to p/e cycles; sudden death may occur when the block is close to its p/e cycle limit. then unrecoverable bit errors will cause fatal data loss (especially for system data or fat). global wear leveling algorithm evenly distributes the p/e cycles of each b lock to minimize the possibility of one block exceeding its max p/e cycles before the rest. in return, the life expectancy of memory storage device is prolonged and the chance/occurrence of unrecoverable bit errors could be reduced. 2.8 staticd atarefresh tec hnology ? en sure d ata integrity over time the error bits accumulate to the threshold in the flash memory cell and eventually become uncorrectable despite using the ecc engine. in the traditional handling method, the data is moved to a different location in the flash memory; despite the corrupted data is beyond repair ed before the transition. to prevent data corruption, the microsd/ sd card mo nitors the error bit levels in each read operation; when it reaches the preset threshold value, staticdatarefresh is achieved by erasing and re - prog ramming the data into the same block or into another block . after the re - programming operation is completed, the controller reads the data and compares the data/parity to ensure data integrity. formatted: font: formatted: font: (asian) chinese (taiwan) formatted: table 1-1 y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 11 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification 2.9 s d life monitorin g tool ? l ifespan check atp provides sd life monitoring tool , which can automatically identify atp memory cards and check the remaining life of atp microsd / sd cards under w indows 2000/xp/vista/7 . users can thus evaluate atp memory card ? s health status a t run time and receive a n early warning before i ts life ends. user friendly life bar remaining life % y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 12 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification figure 2 - 9 : sd life monitoring note: the microsd/ sd card will be busy while sd life monitor ing tool is retriev ing the information from the memory card. due to this reason, the user cant' e xecute this software from the same microsd/ sd card that is being monitored. 2.6 2.10 physical dimension ( dimension ( units in mm) type measurement length 1 5 mm +/ - 0.1mm width 1 1 mm +/ - 0.1mm thickness 1.0mm +/ - 0.1mm weight 0.4 g max. table 2 - 10: physica l dimensio n formatted: table 1-1 formatted: bullets and numbering formatted: font: (asian) chinese (taiwan) formatted: table 1-1 , space before: 0 pt, after: 0 pt y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 13 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification 2.7 2.11 mechanical f orm f actor (units in mm) figure 1 2 - 1 1 : dimensions o f microsd (bottom view) formatted: font: 8 pt formatted: bullets and numbering y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 14 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification figure 1 2 - 1 2 : dimensions of microsd (top view) y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 15 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 16 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification 3 electrical characteristics 3.1 dc characteristics figure 3 - 1 : bus signal level paramet er symbol min typical max unit remark supply v oltage v dd 2. 7 3.3 3.6 v operating current i cc1 - 30 5 0 50 ma standby current i sb - - 2 0 0 a input leakage current i li - 10 - 10 a output leakage current i lo - 10 - 10 a input high voltage v ih 0. 625 x v dd - v dd + 0.3 v input low voltage v il vss - 0.3 - 0.2 5 x v dd v output high voltage v oh 0.75x v dd - - v output low voltage v ol - - 0. 125 x v dd v table 3 - 1 : dc characteristics formatted: font: (asian) chinese (taiwan) y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 17 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification 3.2 ac characteristics figure 3 - 2 : timing diagram data input/output referenced to clock ( default ) high speed mode bus timing : parameter symbol min max unit remark y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 18 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification clock clk (all values are referred to min (v ih ) and max (v il ) clock frequency data transfer mode f pp 0 50 mhz c card <= 10 pf( 1 card) clock low time t wl 7 - ns c card <= 10 pf( 1 card) clock high time t wh 7 - ns c card <= 10 pf( 1 card) clock rise time t tlh - 3 ns c card <= 10 pf( 1 card) clock fal l time t thl - 3 ns c card <= 10 pf( 1 card) inputs cmd, dat (referenced to clk) input set - up time t isu 6 - ns c card <= 10 pf( 1 card) input hold time t ih 2 - ns c card <= 10 pf( 1 card) outputs cmd, dat (referenced to clk) output delay time during data tra nsfer mode t odly - 14 ns c l <= 40 pf( 1 card) table 3 - 2 : bus timing - parameters values ( high speed mode ) default bus timing(backward compatible) : parameter symbol min max unit remark clock clk (all values are referred to min (v ih ) and max (v il ) clock frequency data transfer mode z f pp 0 25 mhz c l <= 1 0 pf( 1 card) clock frequency identification mode f od 0 /100 400 khz c l <= 1 0 pf( 1 card) clock low time t wl 10 - ns c l <= 1 0 pf( 1 card) clock high time t wh 10 - ns c l <= 1 0 pf( 1 card) clock rise time t tlh - 10 ns c l <= 1 0 pf( 1 card) clock fall time t thl - 10 ns c l <= 1 0 pf( 1 card) inputs cmd, dat (referenced to clk) input set - up time t isu 3 - ns c l <= 1 0 pf( 1 card) input hold time t ih 3 - ns c l <= 1 0 pf( 1 card) outputs cmd, dat (referenced to clk) ou tput delay time during data transfer mode t odly 0 14 ns c l <= 4 0 pf( 1 card) output delay time during identification mode t odly 0 50 ns c l <= 4 0 pf( 1 card) formatted: no underline y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 19 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification parameter symbol min max. unit remark clock clk (all values are referred to min (v ih ) and max (v il ), clock frequency data transfer mode f pp 0 25 mhz c l <= 100 pf (7 cards) clock frequency identification mode f od 0 (1) /100khz 400 khz c l <= 250 pf (21 cards) clock low time t wl 10 ns c l <= 100 pf (7 cards) clock high time t wh 10 ns c l <= 100 pf (7 cards) clock rise time t tlh 10 ns c l <= 100 pf (7 cards) clock fall time t thl 10 ns c l <= 100 pf (7 cards) clock low time t wl 50 ns c l <= 250 pf (21 cards) clock high time t wh 50 ns c l <= 250 pf (21 cards) clock rise time t tlh 50 ns c l < = 250 pf (21 cards) clock fall time t thl 50 ns c l <= 250 pf (21 cards) inputs cmd, dat (referenced to clk) input set - up time t isu 5 ns c l <= 25 pf (1 card) input hold time t ih 5 ns c l <= 25 pf (1 card) outputs cmd, dat (referenced to clk) outpu t delay time during data transfer mode t odly 0 14 ns c l <= 25 pf (1 card) output delay time during identification mode t odly 0 50 ns c l <= 25 pf (1 card) table 3 - 2 3 : bus timing - parameters values ( default ) (1) 0hz means to stop the clock. the given minimu m frequency range is for cases were continues clock is required. y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 20 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification figure 3 - 3 : timing diagram data input/output referenced to clock (high - speed) parameter symbol min max unit remark clock clk (all values are referred to min (v ih ) and max (v il ) clock frequency data transfer mode f pp 0 50 mhz c l <= 1 0 pf( 1 card) clock low time t wl 7 - ns c l <= 1 0 pf( 1 card) clock high time t wh 7 - ns c l <= 1 0 pf( 1 card) clock rise time t tlh - 3 ns c l <= 1 0 pf( 1 card) clock fall time t thl - 3 ns c l <= 1 0 pf( 1 card) inputs cmd, dat (referenced to clk) input set - up time t isu 6 - ns c l <= 1 0 pf( 1 card) input hold time t ih 2 - ns c l <= 1 0 pf( 1 card) outputs cmd, dat (referenced to clk) output delay time during data transfer mode t odly - 14 ns c l <= 4 0 pf( 1 card) ta ble 3 - 3 : bus timing - parameters values (high - speed) y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 21 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification 4 micro sd card hardware system 4.1 micro sd card description figure 4 - 1: micro sd card function block diagram pin # sd interface spi interface name type 1 description name type 1 descrip tion 1 dat 2 i/o/pp data line [bit 2] rsv 2 cd/ dat 3 2 i/o/pp 3 card detect / data line [bit 3] cs i 3 chip select (active low) 3 cmd pp command/ response di i data in 4 v dd s supply voltage v dd s supply voltage 5 clk i clock sclk i clock 6 v ss s supply voltage ground v ss s supply voltage ground 7 dat 0 i/o/pp data line [bit 0] do o/pp data out 8 dat1 i/o/pp data line [bit 1] rsv table 4 - 1 : pad assignment 1) s:power supply; i: input; o; output using push - pull drivers; pp: i/o using push - pull drivers ; 2) the extended dat lines (dat1 - dat3) are input on power up. they start to operate as dat lines after set_bus_width command. the host shall keep its own dat1 - dat3 lines in input mode, as well, while they are not used. it is defined so, in order to keep compatibility to multimediacards. y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 22 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification 3) after power up this line is input with 50kohm pull - up (can be used for card detection or sp i mode selection). the pull - up should be disconnected by user, during regular data transfer, with set_clr_card_detect (acmd42) command. each card has a set of information registers . please refer to chapter 5 for the details of registers. name width description cid 128 card identification number; card individual number for identification. rca 16 relative card address; loca l system address of a card, dynamically suggested by the card and approved by the host during initialization. dsr 16 driver stage register; to configure the card?s output drivers. csd 128 card specific data; information about the card operation co nditions. scr 64 micro sd configuration register; information about the sd card ?s special features capabilities. ocr 32 operation conditions register . ssr 512 mirco sd status; information about the card proprie tary features. csr ocr 3232 card sta tus; information about the card status . operation conditions register . table 4 - 2 : micro sd card registers 4.2 micro sd b us topology the micro sd card bus has a single master (application), multiple slaves (cards), synchronous star topology. clock, power and ground signals are common to all cards. command (cmd) and data (dat0 - dat3) signals are dedicated to each card providing continues point to point connection to all the cards. during initialization process commands are sent to each card individually, allo wing the application to detect the cards and assign logical addresses to the physical slots. data is always sent (received) to (from) each card individually. however, in order to simply the handling of the card stack, after the initialization process, all commands may be sent concurrently to all cards. addressing information is provided in the command packet. micro sd bus allows dynamic configuration of the number of data lines. after power up, by default, the micro sd card will use only dat0 for data transfe r. after initialization the host can change the bus width (number of active data lines). this feature allows easy trade off between hw cost and system performance. note that while dat1 - dat3 are not in use, the related host?s dat lines should be in tri - sta te (input mode) . comment [y1]: 2 2 ??? y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 23 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification figure 4 - 2 : mcrio sd card system bus topology 4.3 micro sd card hardware interfa ce the micro sd card has six communication lines and three supply lines: ? cmd: command is a bidirectional signal. the host and card drivers are operating in push pull mode. ? dat0 - 3: data lines are bidirectional signals. host and card drivers are operating in push pull mode ? clk: clock is a host to card signal. clk operates in push pull mode ? vdd: vdd is the power supply line for all cards. ? vss1 , vss2 are two ground lines. in addition to those lines that are connected to the internal card circuitry there are two contacts of the write protect/card detect switch that are part of the socket. those contacts are not mandatory but if they exist they s hould be connected as given in the following figure. when dat3 is used for card detection, r dat for dat3 should be unconnected and another resistor should be connected to the ground. r dat and r cmd are pull - up resistors protecting the cmd and the dat lines against bus floating when no card is inserted or when all card drivers are in a high - impedance mode. the host shall pull - up all dat0 - 3 lines by rdat, even if the host uses micro sd card as 1 bit mode - only in sd mode. also, the host shall pull - up all "rsv" lines in spi mode, even though they are not used. r wp is used for the write protect/card detection switch. y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 24 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification figure 4 - 3: bus circuitry diagram 4.4 bus signal line load the total capacitance cl of each line of the micro sd bus is the sum of the bus master capacitance c host , the bus capacitance cbus itself and the capacitance c card of each card connected to this line: c l = c host + c bus + n*c card n is the number of connected cards. parameter symbol min max. unit remark pull - up resistance for cmd r cm d 10 1 00 kohm to prevent bus floating pull - up resistance for dat r dat 10 100 kohm to prevent bus floating total bus capacitance for each signal line c l 4 0 pf 1 card chost+cbus shall not exceed 30 pf single card capacitance c card 10 pf maximum signal l ine inductance 16 nh f pp <= 20 mhz pull - up resistance inside card (pin1) rdat3 10 90 kohm may be used for card detection table 4 - 3 : bus signal line load y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 25 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 26 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification 4.5 hot i nsertion and r emoval to guarantee the proper sequence of card pin connection during hot insertion, the use of either a special hot - insertion capable card connector or an auto - detect loop on the host side (or some similar mechanism) is mandatory. no card shall be damaged by inserting or removing a card into the mciro sd card bus even when the p ower (vdd) is up. data transfer operations are protected by crc codes, therefore any bit changes induced by card insertion and removal can be detected by the micro sd card bus master. the inserted card must be properly reset also when clk carries a clock fr equency f pp . each card shall have power protection to prevent card (and host) damage. data transfer failures induced by removal/insertion are detected by the bus master. they must be corrected by the application, which may repeat the issued command. 4.6 powe r up the power up of the mciro sd card bus is handled locally in each sd card and in the bus master. figure 4 - 4 : power - up diagram ? ?power up time? is defined as voltage rising time from 0 volt to vdd min and depends on application parameters such as th e maximum number of micro sd cards, the bus length and the characteristic of the power supply unit. y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 27 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification ? ?supply ramp up time? provides the time that the power is built up to the operating level (the bus master supply voltage) and the time to wait until the mi cro sd ca rd can accept the first command. ? the host shall supply power to the card so that the voltage is reached to vdd_min within 250ms and start to supply at least 74 sd clocks to the mciro sd card with keeping cmd line to high. in case of spi mode, cs s hall be held to high during 74 clock cycles. ? after power up (including hot insertion, i.e. inserting a card when the bus is operating) the mciro sd card enters the idle state . in case of sd host, cmd0 is not necessary. in case of spi host, cmd0 shall be t he first command to send the card to spi mode. ? cmd8 is newly added in the physical layer specification version 2.00 to support multiple voltage ranges and used to check whether the card supports supplied voltage. the version 2.00 host shall issue cmd8 an d verify voltage before card initialization. the host that does not support cmd8 shall supply high voltage range. ? acmd41 is a synchronization command used to negotiate the operation voltage range and to poll the cards until they are out of their power - up sequence. in case the host system connects multiple cards, the host shall check that all cards satisfy the supplied voltage. otherwise, the host should select one of the cards and initialize. 4.7 compatibility to multi media card the micro sd card protocol i s designed to be a super - set of the multi media card version 2.11 protocol. for complete details refer to multi media c ard specification. 4.7 4.8 card capacity ? standard capacity micro sd memory cards supports capacity up to and including 2 g bytes (231 bytes). all versions of the physical specifications define the standard capacity micro sd memory card. ? high capacity micro sd memory cards supports capacity more than 2 g bytes (231 bytes) and this version of specification limits capacity up to and including 32 gb . high capacity sd memory card is newly defined from the physical layer specification version 2.00. only hosts that are compliant to the physical layer specification version 2.00 or higher and the sd file system specification ver2.00 can access high capaci ty mciro sd memory cards. other hosts fail to initialize high capacity micro sd memory cards . formatted: bullets and numbering y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 28 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification figure 4 - 5 : hosts - cards usability y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 29 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification 5 card registers within the card interface eight seven registers are defined: ocr, cid, csd, rca, dsr , scr , ssr and csr . these can be accessed only by corresponding commands. the ocr, cid, csd and scr registers carry the card/content specific information, while the rca and dsr register s are is configuration register s storing actual configuration paramete rs and ssr and csr are two status fields . 5.1 ocr register the 32 - bit operation conditions register stores the vdd voltage profile of the card. in addition, this register includes a status information bit. this status bit is set if the card power up procedure has been finished. ocr bit position vdd voltage window 0 - 3 reserved 4 reserved 5 reserved 6 reserved 7 reserved for low voltage range 8 reserved 9 reserved 10 reserved 11 reserved 12 reserved 13 reserved 14 reserved 15 2.7 - 2.8 16 2.8 - 2.9 17 2.9 - 3.0 18 3.0 - 3.1 19 3.1 - 3.2 20 3.2 - 3.3 21 3.3 - 3.4 22 3.4 - 3.5 23 3.5 - 3.6 24 - 29 reserved 30 card capacity status (ccs) 1 31 card power up status bit (busy) 2 1) this bit is valid only when the card power up status bit is set. 2) this bit is set to low if the card has not finished the power up routine table 5 - 1 : ocr r egister d efinition the supported voltage range is coded as shown in table 5- 1 . a voltage range is not supported if the corresponding bit value is set to low. as long as the card is bu sy, the corresponding bit (31) is set to low. y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 30 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification 5.2 cid register the card i d entification (cid) register is 128 bits wide. it contains the card identification information used during the card identification phase. every individual flash card shall have a unique i dentification number. the structure of the cid register is defined in the following paragraphs: name field width cid - slice manufacturer id mid 8 [127:120] oem/application id oid 16 [119:104] product name pnm 40 [103:64] product revision prv 8 [ 63 : 56 ] product serial number psn 32 [ 55 : 24 ] reserved -- 4 [ 23 : 20 ] manufacturing date mdt 12 [ 19 : 8 ] crc7 checksum crc 7 [ 7 : 1 ] not used, always ?1? - 1 [ 0 : 0 ] table 5 - 2 : the cid fields ? mid an 8 bit binary number identifies the card manufacturer. the mid n umber is controlled, defined and allocated to a sd card manufacturer by the sd group. this procedure is established to ensure uniqueness of the cid register. ? oid a 2 ascii string characters that identifies the card oem and/or the card contents (when use d as a distribution media either on rom or flash cards). the oid number is controlled, defined and allocated to a micro sd card manufacturer by the sd group. this procedure is established to ensure uniqueness of the cid register. ? pnm the product name is a string, 5 ascii characters long. ? prv the product revision is composed of two binary coded decimal (bcd) digits, four bits each, representing an ?n.m? revision number. the ?n? is the most significant nibble and ?m? is the least significant nibble. as an example, the prv binary value field for product revision ?6.2? will be: 0110 0010 ? psn comment [leo2]: ?? atp , cid a?5? y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 31 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification the serial number is 32 bits of binary number. ? mdt the manufacturing date composed of two hexadecimal digits, one is 8 bit representing the year(y) and the other is four bits representing the month(m). the ?m? field [11:8] is the month code. 1 = january. the ?y? field [19:12] is the year code. 0 = 2000. as an example, the binary value of the date field for production date ?april 2001? will be: 00000001 0100. ? crc crc7 checksum (7 bits). this is the checksum of the cid contents . 5.3 csd register the card - specific data register provides information on how to access the card contents. the csd defines the data format, error correction type, maximum data access time, whe ther the dsr register can be used etc. the programmable part of the register (entries marked by w or e, see below) can be hanged by cmd27. the type of the entries in the table below is coded as follows: r = readable, w(1) = writable once, w = multiple wri table. name field width cell type csd - slice csd structure csd_structure 2 r [127:126] reserved - 6 r [125:120] data read access - time - 1 taac 8 r [119:112] data read access - time - 2 in clk cycles (nsac*100) nsac 8 r [111:104] max. da ta transfer rate tran_speed 8 r [103:96] card command classes ccc 12 r [95:84] max. read data block length read_bl_len 4 r [83:80] partial blocks for read allowed read_bl_partial 1 r [79:79] write block misalignment write_blk_misal ign 1 r [78:78] read block misalignment read_blk_misalign 1 r [77:77] dsr implemented dsr_imp 1 r [76:76] reserved - 6 r [75:7 0 ] device size c_size 2 2 r [ 69 : 48 ] reserved - 1 r [47:47] erase single block enable erase_blk_en 1 r [46:46] erase sector size sector_size 7 r [45:39] write protect group size wp_grp_size 7 r [38:32] y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 32 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification write protect group enable wp_grp_enable 1 r [31:31] reserved 2 r [30:29] write speed factor r2w_factor 3 r [28:26] max. write data block length write_bl_len 4 r [25:22] partial blocks for write allowed write_bl_partial 1 r [21:21] reserved - 5 r [20:16] file format group file_format_grp 1 r [15:15] copy flag (otp) copy 1 r/w(1) [14:14] permanent w rite protection perm_write_protect 1 r/w(1) [13:13] temporary write protection tmp_write_protect 1 r/w [12:12] file format file_format 2 r [11:10] reserved - 2 r [9:8] crc crc 7 r/w [7:1] not used, always?1? - 1 - [0:0] tabl e 5 - 3 : the csd register fields the following sections describe the csd fields and the relevant data types. if not explicitly defined otherwise, all bit strings are interpreted as binary coded numbers starting with the left bit first. ? csd_structure vers ion number of the related csd structure csd_structure csd structure version valid for sd card physical specification versio n 0 csd version 1.0 version 1.0 - 1.10 version 2.00/standard capacity 1 csd version 2 .0 version 2.00 /high capacity 2 - 3 rese rved table 5 - 4 : csd register structure ? taac defines the asynchronous part of the data access time. y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 33 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification taac bit position code 2:0 time unit 0=1ns, 1=10ns, 2=100ns, 3=1s, 4=10s, 5=100s, 6=1ms, 7=10ms 6:3 time value 0=reserved, 1=1.0, 2=1.2, 3=1.3, 4=1.5, 5=2.0, 6=2.5, 7=3.0, 8=3.5, 9=4.0, a=4.5, b=5.0, c=5.5, d=6.0, e=7.0, f=8.0 7 reserved table 5 - 5 : taac access time definition ? nsac defines the worst case for the clock dependent factor of the data access time. the unit for nsac is 100 clock cycles. therefore, the maximal value for the clock dependent part of the data access time is 25.5k clock cycles. the total access time nac i s the sum of taac and nsac. it has to be computed by the host for the actual clock rate. the read access time should be interpreted as a typical delay for the first data bit of a data block or stream. ? tran_speed the following table defines the maximum d ata transfer rate per one data line - tran_speed: tran_speed bit code 2:0 transfer rate unit 0=100kbit/s, 1=1mbit/s, 2=10mbit/s, 3=100mbit/s, 4... 7=reserved 6:3 time value 0=reserved, 1=1.0, 2=1.2, 3=1.3, 4=1.5, 5=2.0, 6=2.5, 7=3.0, 8=3.5 , 9=4.0, a=4.5, b=5.0, c=5.5, d=6.0, e=7.0, f=8.0 7 reserved table 5 - 6 : maximum data transfer rate definition note that for current sd card s that field is always 0_0110_010b (032h) which is equal to 25mhz - the mandatory maximum operating frequency o f sd card . in high - speed mode, that field is always 0_1011_010b (05ah) which is equal to 50mhz. and when the timing mode returns to the default by cmd6 or cmd0 command, its value will be 032h. y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 34 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification ? ccc the sd card command set is divided into subsets (command classes). the card command class register ccc defines which command classes are supported by this card. a value of ?1? in a ccc bit means that the corresponding command class is supported. ccc bit supported card command class 0 class 0 1 class 1 ...... 11 class 11 table 5 - 7 : supported card command classes ? read_bl_len the maximum read data block length is computed as 2 read_bl_len . the maximum block length might therefore be in the range 512...2048 bytes. note that in micro sd card the write_ bl_len is always equal to read_bl_len read_bl_len block length remark 0 - 8 reserved 9 2 9 = 512 bytes ...... 11 2 11 = 2048 bytes 12 - 15 reserved table 5 - 8 : data block length ? read_bl_partial (always = 1 in micro sd card ) partial block read is always allowed in micro sd card . it means that smaller blocks can be used as well. the minimum block size will be one byte. ? write_blk_misalign defines if the data block to be written by one command can be spread over more than one physical block of the memory device. the size of the memory block is defined in write_bl_len. write_blk_misalign=0 signals that crossing physical block boundaries is invalid. write_blk_misalign=1 signals that crossing physical block boundaries is allowed. y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 35 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification ? read_blk_mi salign defines if the data block to be read by one command can be spread over more than one physical block of the memory device. the size of the memory block is defined in read_bl_len. read_blk_misalign=0 signals that crossing physical block boundaries is invalid. read_blk_misalign=1 signals that crossing physical block boundaries is allowed. ? dsr_imp defines if the configurable driver stage is integrated on the card. if set, a driver stage register (dsr)must be implemented also. ? c_size this field is e xpanded to 22 bits and can indicate up to 2 tbytes (it is the same as the maximum memory space specified by a 32 - bit block address.) this parameter is used to calculate the user data area capacity in the micro sd memory card (not include the protected area) . the user data area capacity is calculated from c_size as follows: memory capacity = (c_size+1) * 512k byte as the maximum capacity of the physical layer specification version 2.00 is 32 gb, the upper 6 bits of his field shall be set to 0. ? erase_blk_en this field is fixed to 1, which means the host can erase one or multiple units of 512 bytes. ? sector_size this field is fixed to 7fh, which indicates 64 kbytes. this value does not relate to erase operation. ve rsion 2.00 cards indicates memory bounda ry by au size and this field should not be used. ? wp_grp_size this field is fixed to 00h. the high capacity micro sd memory card does not support write protected groups. ? wp_grp_enable this field is fixed to 00h. the high capacity micro sd memory card do es not support write protected groups. ? r2w_factor this field is fixed to 2h, which indicates 4 multiples. write timeout can be calculated by multiplying the read access time and r2w_factor. however, the host should not use this factor and should use y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 36 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification 250 ms for write timeout. ? write_bl_len this field is fixed to 9h, which indicates write_bl_len=512 byte. ? write_bl_partial this field is fixed to 0, which indicates partial block read is inhibited and only unit of block access isallowed. . ? file_format_ grp this field is set to 0. host should not use this field. . ? copy defines if the contents is original (= ?0?) or has been copied (=?1?). the copy bit for otp and mtp devices, sold to end consumers, is set to ?1? which identifies the card contents as a c opy. the copy bit is an one time programmable bit. ? perm_write_protect permanently protects the whole card content against overwriting or erasing (all write and erase commands for this card are permanently disabled). the default value is ?0?, i.e. not pe rmanently write protected. ? tmp_write_protect temporarily protects the whole card content from being overwritten or erased (all write and erase commands for this card are temporarily disabled). this bit can be set and reset. the default value is ?0?, i.e . not write protected. ? file_format this field is set to 0. ? crc the crc field carries the check sum for the csd contents. the checksum has to be recalculated by the host for any csd modification. the default corresponds to the initial csd contents. 5.4 rca register the writable 16 - bit relative card address register carries the card address that is published by the card during the card identification. this address is used for the addressed host - card communication after the card identification procedure. t he default value of the rca register is 0x0000. the value 0x0000 is reserved to set all cards into the stand - by state with cmd7. y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 37 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification 5.5 dsr register 16- bit driver stage register . it can be used to improve the bus performance for extended operating conditions ( depending on parameters like bus length, transfer rate or number of cards). the csd register carries the information about the dsr register usage. the default value of the dsr register is 0x404. 5.6 5.5 scr register in addition to the csd register there is another configuration register that named - sd card configuration register (scr). scr provides information on sd card 's special features that were configured into the given card. the size of scr register is 64 bit. this register is set in the factory by atp . the following table describes the scr register content. description field width cell type scr slice scr structure scr_structure 4 r [63:60] sd card - spec. version sd_spec 4 r [59:56] data_status_after erases data_stat_after_erase 1 r [5 5:55] sd security support sd_security 3 r [54:52] dat bus widths supported sd_bus_widths 4 r [51:48] reserved - 16 r [47:32] reserved for manufacturer usage - 32 r [31:0] table 5 - 1 6 : the scr fields ? scr_structure version number of the related scr structure in the sd card physical layer specification. scr_structure scr structure version valid for sd physica l layer specification versio n 0 scr version no. 1.0 version 1.0 1 - 2 . 0 0 1 - 15 reserved table 5 - 9 : scr register st ructure version formatted: bullets and numbering formatted: bullets and numbering y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 38 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification ? micro sd_spec describes the micro sd card physical layer specification version supported by this card. micro sd_spec physical layer speci fication version number 0 version 1.0 - 1.01 1 version 1.10 2 version 2 . 0 0 3 - 15 reserve d table 5 - 1 0 : micro sd card physical layer specification version ? data_stat_after_erase defines the data status after erase, whether it is ?0? or ?1?. ? micro sd_security describes the security algorithm supported by the card. micro sd_security suppo rted algorithm 0 no security 1 not used 2 version 1.01 3 version 2 . 0 4 - 7 reserved table 5 - 1 1 : micro sd supported security algorithm ? micro sd_bus_widths describes all the dat bus widths that are supported by this card. micro sd_bus_widths sup ported bus widths bit 0 1 bit (dat0) y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 39 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification bit 1 reserved bit 2 4 bit (dat0 - 3) bit 3 [msb] reserved table 5 - 12: micro sd card supported bus widths 5.6 ss r register mciro sd status; information about the card proprietary features (see 6.5 ) 5.7 cs r regis ter card status; information about the card status (see 6.5). formatted: bullets and numbering formatted: bullets and numbering y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 40 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 41 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification 6 mcrio sd card f unctional d escription 6.1 mciro sd bus protocol communication over the mciro sd bus is based on command and data bit streams which are initiated by a start bit and terminated by a stop bit. ? command : a command is a token which starts an operation. a command is sent from the host either to a single card (addressed command) or to all connected cards (broadcast command). a command is transferred serially on the cmd line. ? respo nse : a response is a token which is sent from an addressed card, or (synchronously) from all connected cards, to the host as an answer to a previously received command. a response is transferred serially on the cmd line. ? data : data can be t ransferred from the card to the host or vice versa. data is transferred via the data lines. figure 6 - 1 : ?no response? and ?no data? operations card addressing is implemented using a session address, assigned to the card during the initialization phase. the basic transaction on the sd bus is the command/response transaction. this type of bus transactions transfers their information directly within the command or response structure. in addition, some operations have a data token. data transfers to/from t he mciro sd card are done in blocks. data blocks always were succeeded by crc bits. single and multiple block operations are defined. note that the multiple block operation mode is better for faster write operation. a multiple block transmission is terminat ed when a stop command follows on the cmd line. data transfer can be configured by the host to use single or multiple data lines. y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 42 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification figure 6 - 2 : (multiple) block read operation the block write operation uses a simple busy signaling of the write operatio n duration on the dat0 data line regardless of the number of data lines used for transferring the data figure 6 - 3 : (multiple) block write operation command tokens have the following coding scheme: figure 6 - 4 : command token format y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 43 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification figure 6 - 5 : r esponse token format in the cmd line the msb bit is transmitted first the lsb bit is the last. when the wide bus option is used, the data is transferred 4 bits at a time. start and end bits, as well as the crc bits, are transmitted for every one of the da t lines. crc bits are calculated and checked for every dat line individually. the crc status response and busy indication will be sent by the card to the host on dat0 only (dat1 - dat3 during that period are don?t care). there are two types of data packet fo rmat for the sd card. (1) usual data (8 bit width ) the usual data (8 bit width) are sent in lsb (least significant byte) first, msb (most significant byte) last manner. but in the individual byte it is msb (most significant bit) first, lsb (least significa nt bit) last. figure 6 - 6 : data packet format - usual data (2) wide width data (sd memory register) the wide width data is shifted from msb bit. y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 44 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification figure 6 - 7 : data packet format - wide width data 6.2 c ommand 6.2.1 command types and format all communication betw een host and cards is controlled by the host (master). the host sends commands of two types: broadcast and addressed (point - to - point) commands. ? broadcast commands broadcast commands are intended for all cards. some of these commands require a response. ? addressed (point - to - point) commands the addressed commands are sent to the addressed card and cause a response from this card. ? command format all commands have a fixed code length of 48 bits, needing a transmission time of 2.4 s @ 20 mhz y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 45 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification bit positio n 47 46 [45:40] [39:8] [7:1] 0 width (bits) 1 1 6 32 7 1 value ?0? ?1? x x x ?1? description start bit transmission bit command index argument crc7 end bit table 6 - 1 : command format a command always starts with a start bit (always ?0?), followed by the bit indicating the direction of transmission (host = ?1?). the next 6 bits indicate the index of the command, this value being interpreted as a binary coded number (between 0 and 63). some commands need an argument (e.g. an ad dress), which is coded by 32 bits. a value denoted by ?x? in the table above indicates this variable is dependent on the command. all commands are protected by a crc. every command codeword is terminated by the end bit (always ?1?). all commands and their arguments are listed in table 6- 3- table 6- 11. 6.2.2 command classes the command set of the sd card system is divided into several classes (see table 6- 2). each class supports a set of card functionalities. class 0, 2, 4, 5 and 8 are mandatory supported by atp sd card s. the other classes are optional. the supported card command classes (ccc) are coded as a parameter in the card specific data (csd) register of each card, providing the host with information on how to access the card. card command class 0 1 2 3 4 5 6 7 8 9 10 11 s upported commands class description basic reserved block read reserv ed b lock write erase write protection lock card application specific i/o mode switch reserved cmd0 mandatory + cmd2 mandatory + cmd3 mandatory + cmd4 mandatory + cmd5 optional + cmd6 mandatory + cmd7 mandatory + cmd 8 mandatory + comment [leo3]: atp ? ? y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 46 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification cmd9 mandatory + cmd10 mandatory + cmd12 mandatory + cmd13 mandatory + cmd15 mandatory + cmd16 mandatory + + + cmd17 mandatory + cmd18 mandatory + cmd24 ma ndatory + cmd25 mandatory + cmd27 mandatory + cmd28 optional + cmd29 optional + cmd30 optional + cmd32 mandatory + cmd33 mandatory + cmd3 4 - 37 optional + cmd38 mandato ry + cmd42 optional + cmd50 optional + cmd52 optional + cmd53 optional + cmd55 mandatory + cmd56 mandatory + c md57 optional + acmd6 mandatory + acmd13 mandatory + acmd22 mandatory + acmd23 mandatory + acmd41 mandatory + acmd42 mandatory + acmd51 mandatory + table 6 - 2 : card command classes (cccs) y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 47 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification 6.2.3 detailed command description the following tables define in detail all mciro sd card bus commands. cmd index type argument resp abbreviation command description cmd0 bc [31:0] stuff bits - g o_idle_state resets all cards to idle state cmd1 reserved cmd2 bcr [31:0] stuff bits r2 all_send_cid asks any card to send the cid numbers on the cmd line (any card that is connected to the host will respond) cmd3 bcr [31:0] stuff bits r6 s end_relative_ addr ask the card to publish a new relative address (rca) cmd4 bc [31:16] dsr [15:0] stuff bits - set_dsr programs the dsr of all cards cmd5 reserved for i/o cards (refer to "sdio card specification") cmd7 ac [31:16] rca [15:0] stuff bits r1b (only from the selected card) select/deselect_ card command toggles a card between the stand - by and transfer states or between the programming and disconnect states. in both cases the card is selected by its own relative address and gets deselected by any other address; address 0 deselects all. in case that the rca equal 0 then the host may do one of the following: - use other rca number to perform card deselection. - re - send cmd3 to change its rca number to other than 0 and then use cmd7w ith rca=0 for card de - selection. cmd8 bcr [ 31:12]reserved bits [11:8]supply voltage(vhs) [7:0]check pattern r7 send_if_cond sends sd memory card interface condition, which includes host supply voltage information and asks the card whether card supports voltage. reserved bits shall be set to '0'. cmd9 ac [31:16] rca [15:0] stuff bits r2 send_csd addressed card sends its card - specific data (csd) on the cmd line. cmd10 ac [31:16] rca [15:0] stuff bits r2 send_cid addressed card sends its card identification (cid) on cmd the line. cmd11 reserved cmd12 ac [31:0] stuff bits r1b stop_ transmission forces the card to stop transmission cmd13 ac [31:16] rca [15:0] stuff bits r1 send_status addressed card sends its status register. cmd14 reserved y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 48 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification cmd15 ac [31:16] rca [15:0] stuff bits - go_inactive_ state sets the card to inactive state in order to pro tect the card stack against com munication breakdowns. table 6 - 3 : basic commands (class 0) cmd index type argument resp abbreviation command description cmd16 ac [31:0] block length r1 set_blocklen in the case of a standard capacity sd memory card, this command sets the block length (in bytes) for all following block commands (read, write, lock). default block lengt h is fixed to 512 bytes. set length is valid for memory access commands only if partial block read operation are allowed in csd. in the case of a high capacity sd memory card, block length set by cmd16 command does not affect the memory read and write comm ands. always 512 bytes fixed block length is used. this command is effective for lock_unlock command. in both cases, if block length is set larger than 512bytes, the card sets the block_len_error bit. cmd17 adtc [31:0] data address r1 read_single_ bloc k in the case of a standard capacity sd memory card, this command, this command reads a block of the size selected by the set_blocklen command 1 . in the case of a high capacity card, block length is fixed 512 bytes regardless of the set_blocklen command. cmd18 adtc [31:0] data address r1 read_multiple_block continuously transfers data blocks from card to host until interrupted by a stop_transmission command. cmd19 reserved ... cmd23 1) the data transferred must not cross a physical block b oundary unless read_blk_misalign is set in the csd. table 6 - 2 : block oriented read commands (class 2) y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 49 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification cmd index type argument resp abbreviation command description cmd16 ac [31:0] block length r1 set_blocklen in the case of a standard capaci ty sd memory card, this command sets the block length (in bytes) for all following block commands (read, write, lock). default block length is fixed to 512 bytes. set length is valid for memory access commands only if partial block read operation are allow ed in csd. in the case of a high capacity sd memory card, block length set by cmd16 command does not affect the memory read and write commands. always 512 bytes fixed block length is used. this command is effective for lock_unlock command. in both cases, i f block length is set larger than 512bytes, the card sets the block_len_error bit. cmd24 adtc [31:0] data address r1 write_block in the case of a standard capacity sd memory card, this command writes a block of the size selected by the set_blocklen c ommand 1 . in the case of a high capacity card, block length is fixed 512 bytes regardless of the set_blocklen command. cmd25 adtc [31:0] data address r1 write_multiple_block continuously writes blocks of data until a stop_transmission follows. cmd2 6 reserved for manufacturer cmd27 adtc [31:0] stuff bits r1 program_csd programming of the programmable bits of the csd. 1) the data transferred must not cross a physical block boundary unless write_blk_misalign is set in the csd. in case that writ e partial blocks is not supported then the block length=default block length (given in csd). table 6 - 4 : block oriented write commands (class 4) y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 50 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification cmd index type argument resp abbreviation command description cmd28 ac [31:0] data address r1b set _write_prot if the card has write protection fea - tures, this command sets the write protection bit of the addressed group. the properties of write protection are coded in the card specific data (wp_grp_size). cmd29 ac [31:0] data address r1b clr_wri te_prot if the card provides write protection features, this command clears the write protection bit of the addressed group. cmd30 adtc [31:0] write protect data address r1 send_write_prot if the card provides write protection features, this command asks the card to send the status of the write protection bits. 1 cmd31 reserved 1)32 write protection bits (representing 32 write protect groups starting at the specified address) followed by 16 crc bits are transferred in a payload format via the da ta line. the last (least significant) bit of the protection bits corresponds to the first addressed group. if the addresses of the last groups are outside the valid range, then the corresponding write protection bits shall be set to zero table 6 - 5 : block o riented write protection commands (class 6) cmd index type argument resp abbreviation command description cmd32 ac [31:0] data address r1 erase_wr_blk_start sets the address of the first write - block to be erased. cmd33 ac [31:0] data ad dress r1 erase_wr_blk_end sets the address of the last write block of the continuous range to be erased. cmd38 ac [31:0] stuff bits r1b erase erases all previously selected write blocks. cmd39 reserved cmd40 non valid in sd card - reser ved for multimediacard i/o mode cmd41 reserved table 6 - 6 : erase commands (class 5) y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 51 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification cmd index type argument resp abbreviation command description cmd16 ac [31:0] block length r1 set_blocklen in the case of a standard capacity sd memory card , this command sets the block length (in bytes) for all following block commands (read, write, lock). default block length is fixed to 512 bytes. set length is valid for memory access commands only if partial block read operation are allowed in csd. in the case of a high capacity sd memory card, block length set by cmd16 command does not affect the memory read and write commands. always 512 bytes fixed block length is used. this command is effective for lock_unlock command. in both cases, if block length is set larger than 512bytes, the card sets the block_len_error bit. cmd42 adtc [31:0] stuff bits. r1 lock_unlock used to set/reset the password or lock/unlock the card. the size of the data block is set by the set_block_len command. cmd43 - 49 reserve d cmd51 reserved table 6 - 7 : lock card (class 7) cmd index type argument resp abbreviation command description cmd55 ac [31:16] rca [15:0] stuff bits r1 app_cmd indicates to the card that the next command is an application specific comman d rather than a standard command cmd56 adtc [31:1] stuff bits. [0]: rd/wr1 r1 gen_cmd used either to transfer a data block to the card or to get a data block from the card for general purpose/application specific commands. in the case of a standard capacity sd memory cards, y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 52 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification the size of the data block shall be set by the set_block_len command. in the case of a high capacity sd memory cards, the size of the data block is fixed to 512 byte. the host sets rd/wr=1 for reading data from the card and sets t o 0 for writing data to the card. cmd58 - 59 reserved cmd60 - 63 reserved for manufacturer 1) rd/wr: ?1? the host gets a block of data from the card. ?0? the host sends block of data to the card. all the application specific commands (given in table 21 ) are supported if class 8 is allowed (mandatory in sd card ). table 6 - 8 : application specific commands (class 8) cmd index type argument resp abbreviation command description cmd52. cmd54 reserved for i/o mode (refer to "sdio card specificatio n") table 6 - 9 : i/o mode commands (class 9) the following table describes all the application specific commands supported/reserved by the sd card . all the following acmds shall be preceded with app_cmd command (cmd55). cmd index type argument resp a bbreviation command description acmd6 ac [31:2] stuff bits [1:0]bus width r1 set_bus_width defines the data bus width (?00?=1bit or ?10?=4 bits bus) to be used for data transfer. the allowed data bus widths are given in scr register. acmd13 adtc [31:0] stuff bits r1 sd_status send the sd card status. acmd17 reserved acmd18 -- -- -- -- reserved for sd security applications1 acmd19 to acmd21 reserved acmd22 adtc [31:0] stuff bits r1 send_num_wr_blocks send the number of the writte n (without errors) write blocks. responds with y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 53 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification 32bit+crc data block. if write_bl_partial='0', the unit of acmd22 is always 512byte.if write_bl_partial='1', the unit of acmd22 is a block length which was used when the write command was executed. acmd23 a c [31:23] stuff bits [22:0]number of blocks r1 set_wr_blk_erase_count set the number of write blocks to be pre - erased before writing (to be used for faster multiple block wr command). ?1?=default (one wr block)(2). acmd24 reserved acmd25 -- -- -- -- reserved for sd security applications1 acmd26 -- -- -- -- reserved for sd security applications1 acmd38 -- -- -- -- reserved for sd security applications1 acmd39 to acmd40 reserved acmd41 bcr [ 31]reserved bit [30]hcs(ocr[30]) [29:24]reserve d bits [23:0] vdd voltage window(ocr[23:0]) r3 sd_send_op_cond asks the accessed card to send its operating condition register (ocr) content in the response on the cmd line. acmd42 ac [31:1] stuff bits [0]set_cd r1 set_clr_card_detect connect[1]/d isconnect[0] the 50kohm pull - up resistor on cd/dat3 (pin 1) of the card. acmd43 -- -- -- -- reserved for sd security applications1 acmd49 acmd51 adtc [31:0] stuff bits r1 send_scr reads the sd configuration register (scr). (1) refer to ?sd memory card security specification? for detailed explanation about the sd security features (2) command stop_tran (cmd12) shall be used to stop the transmission in write multiple block whether the pre - erase (acmd23) feature is used or not. table 6 - 10 : application specific commands used/reserved by sd card cmd index type argument resp abbreviation command description cmd6 adtc [31] mode 0:check function 1:switch function [30:24] reserved (all ?0?) r1 switch_ func checks switchable function (mode 0) and switch card function (mode 1). y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 54 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification [23:20] reserved for function group 6 (al l ?0? or 0xf) [19:16] reserved for function group 5 (all ?0? or 0xf) [15:12] reserved for function group 4 (all ?0? or 0xf) [11:8] reserved for function group 3 (all ?0? or 0xf) [7:4] function group 2 for command system [3:0] function group 1 for acce ss mode cmd34 reserved for each command system set by switch function command (cmd6). cmd3 5 cmd3 6 cmd3 7 cmd 50 cmd 57 table 6 - 11 : switch function command s (class 10) 6.3 card state transition table table 6- 12 defines the card state transitions in dependency of the received command. current state idle ready ident stby tran data rcv prg dis ina trigger of state change changes to class independent ?operation complete? - - - - - - - tran stby - class 0 cmd0 idle idle idle idle idle idle idle idle idle - cmd2 - ident - - - - - - - - cmd3 - - stby stby - - - - - - cmd4 - - - stby - - - - - - cmd7, card is addressed - - - tr an - - - - prg - cmd7, card is not addressed - - - stby stby stby - dis - - cmd 8 idle - - - - - - - - - cmd9 - - - stby - - - - - - cmd10 - - - stby - - - - - - cmd12 - - - - - tran prg - - - cmd13 - - - stby tran data rcv prg d is - cmd15 - - - ina ina ina ina ina ina - class 2 cmd16 - - - - tran - - - - - cmd17 - - - - data - - - - - cmd18 - - - - data - - - - - class 4 cmd16 see class 2 cmd24 - - - - rcv - - - - - y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 55 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification cmd25 - - - - rcv - - - - - cmd2 7 - - - - rcv - - - - - class 6 cmd28 - - - - prg - - - - - cmd29 - - - - prg - - - - - cmd30 - - - - data - - - - - class 5 cmd32 - - - - tran - - - - - cmd33 - - - - tran - - - - - cmd38 - - - - prg - - - - - class 7 cmd42 - - - - rcv - - - - - class 8 cmd55 idle - - stby tran data rcv prg dis - cmd56; rd/wr = 0 - - - - rcv - - - - - cmd56; rd/wr = 1 - - - - data - - - - - acmd6 - - - - tran - - - - - acmd13 - - - - data - - - - - y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 56 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification current state idl e ready ident stby tran data rcv prg dis ina acmd22 - - - - data - - - - - acmd23 - - - - tran - - - - - acmd18,25,26,38, 43,44,45,46,47,48,49 refer to ?sd card security specification? for explanation about the sd security features acmd41 , card vdd range compatible ready - - - - - - - - - acmd41, card is busy idle - - - - - - - - - acmd41, card vdd range not compatible ina - - - - - - - - - acmd42 - - - - tran - - - - - acmd51 - - - - data - - - - - class 9 cmd52 - cmd54 re fer to "sdio card specification" class 10 cmd6 - - - - data - - - - - cmd34 - 37,50,57 - - - - tran - - - - - class 11 cmd41; cmd43...cmd49, cmd58 - cmd59 reserved cmd60...cmd63 reserved for manufacturer table 6 - 12 : card state transition table y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 57 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification 6.4 responses all responses are sent via the command line cmd. the response transmission always starts with the left bit of the bit string corresponding to the response codeword. the code length depends on the response type. a response alw ays starts with a start bit (always ?0?), followed by the bit indicating the direction of transmission (card = ?0?). a value denoted by ?x? in the tables below indicates a variable entry. all responses except for the type r3 (see below) are protected by a crc. every command codeword is terminated by the end bit (always ?1?). there are f ive types of responses for sd card . their formats are defined as follows: ? r1 (normal response command): code length 48 bit. the bits 45:40 indicate the index of the command to be responded to, this value being interpreted as a binary coded number (between 0 and 63). the status of the card is coded in 32 bits. note that in case that data transfer to the card is involved then a busy signal may appear on the data line after the transmission of each block of data. the host shell check for busy after data block transmission . bit position 47 46 [45:40] [39:8] [7:1] width (bits) 1 1 6 32 7 value ?0? ?0? x x x description start bit transmission bit command ind ex card status crc7 table 6 - 13 : response r1 ? r1b is identical to r1 with an optional busy signal transmitted on the data line. the card may become busy after receiving these commands based on its state prior to the command reception. the host shell check for busy at the response. refer to chapter 4.12.3 for detailed description and timing diagrams. ? r2 (cid, csd register): code length 136 bits. the contents of the cid register are sent as a response to the commands cmd2 and cmd10. the contents of th e csd register are sent as a response to cmd9. only the bits [127...1] of the cid and csd are transferred, the reserved bit [0] of these registers is replaced by the end bit of the response. bit position 135 134 [133:128] [127:1] 0 width (bits) 1 1 6 127 1 value ?0? ?0? ?111111? x ?1? description start bit transmission bit reserved cid or csd register incl. internal crc7 end bit table 6 - 14 : response r2 ? r3 (ocr register): code length 48 bits. the contents of the ocr register is sent as a response to acmd41. y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 58 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification bit position 47 46 [45:40] [39:8] [7:1] 0 width (bits) 1 1 6 32 7 1 value ?0? ?0? ?111111? x ?1111111? ?1? description start bit transmission bit reserved ocr register reserved end bit table 6 - 15 : response r3 ? r6 (published rca response): code length 48 bit. the bits 45:40 indicate the index of the bit position 47 46 [45:40] [39:8] argument field [7:1] 0 width (bits) 1 1 6 16 16 7 1 value ?0? ?0? x x x x ?1? description start bit transmission bit command index (?000011?) new published rca [31:16] of the card [15:0] card status bits: 23,22,19,12:0 (see table 30) crc7 end bit table 6 - 16 : response r6 command to be responded to - in that case it will be ?00 0011? (together with bit 5 in the status bits it means = cmd3). the 16 msb bits of the argument field are used for the published rca number. ? r 7 (card interface condition) : code length is 48 bits. the card support voltage information is sent by the respon se of cmd8. bits 19 - 16 indicate the voltage range that the card supports. the card that accepted the supplied voltage returns r7 response. in the response, the card echoes back both the voltage range and check pattern set in the argument. bit position 47 46 [45:40] [39:20] [19:16] [15:8] [7:1] 0 width (bits) 1 1 6 20 4 8 7 1 value ?0? ?0? ?001000? ?00000h? x x x ?1? description start bit transmission bit command index reserved bits voltage accepted echo - back of check pat tern crc7 end bit table 6 - 17 : response r 7 y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 59 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification table 6 - 18 shows the format of 'voltage accepted' in r7. voltage accepted value definition 0000b not defined 0001b 2.7 - 3.6v 0010b reserved for low voltage range 0100b reserved 1000b reserved others n ot defined table 6 - 18: voltage accepted in r7 6.5 mciro sd card status mcrios d card supports two card status field as follows: - ? card status ?: compatible to the multimediacard protocol. - ? micro sd_status ?: extended status field of 512bits that supports spe cial features of the mcrio sd card and future application specific features. 6.5.1 card status the response format r1 contains a 32 - bit field named card status . this field is intended to transmit the card?s status information (which may be stored in a local sta tus register) to the host. if not specified otherwise, the status entries are always related to the previous issued command. the semantics of this register is according to the csd entry spec_vers, indicating the version of the response formats (possibly us ed for later extensions). table 6- 17 19 defines the different entries of the status. the type and clear condition fields in the table are abbreviated as follows: ? type: e: error bit. s: status bit. r: detected and set for the actual command response. x: detected and set during command execution. the host must poll the card by issuing the status command in order to read these bits. y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 60 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification ? clear condition: a: according to the card current state. b: always related to the previous command. reception of a valid command will clear it (with a delay of one command). c: clear by read. bits identifier type value description clear condi - ti on 31 out_of_range e r x ?0?= no error ?1?= error the command?s argument was out of the allowed range for this card. c 30 address_error e r x ?0?= no error ?1?= error a misaligned address which did not match the block length was used in the command. c 29 block_len_error e r x ?0?= no error ?1?= error the transferred block length is not allowed for this card, or the number of transferred bytes does not match the block length. c 28 erase_seq_error e r ?0?= no error ?1?= error an error in the sequence of erase commands occurred. c 27 erase_param e r x ?0?= no error ?1?= error an invalid selection of write - blocks for erase occurred. c 26 wp_violation e r x ?0?= not protected ?1?= protected attempt to program a write protected block. c 25 card_is_locked s x ?0? = card unlocked ?1? = card locked when set, signals that the card is locked by the host a bits identifier type value description clear condi - tion 24 lock_unlock_ failed e r x ?0? = no error ?1? = error set when a sequence or password error has been detected in lock/unlock card command. c 23 com_crc_error e r ?0?= no error ?1?= error the crc check of the previous command failed. b 22 illegal_command e r ?0?= no error ?1?= error command not legal for the card state b 21 card_ecc_failed e r x ?0?= success ?1?= failure card internal ecc was applied but fa iled to correct the data. c y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 61 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification 20 cc_error e r x ?0?= no error ?1?= error internal card controller error c 19 error e r x ?0?= no error ?1?= error a general or an unknown error occurred during the operation. c 17, 18 reserved 16 csd_overwr ite e r x ?0?= no error ?1?= error can be either one of the following errors: - the read only section of the csd does not match the card content. - an attempt to reverse the copy (set as original) or permanent wp (unprotected) bits was made. c 15 wp _erase_skip s x ?0?= not protected ?1?= protected only partial address space was erased due to existing write pro tected blocks. c 14 card_ecc_disabled s x ?0?= enabled 1?= disabled the command has been executed without using the internal ecc. a 13 erase_reset s r ?0?= cleared ?1?= set an erase sequence was cleared before executing because an out of erase sequence command was received c 12:9 current_state s x 0 = idle 1 = ready 2 = ident 3 = stby 4 = tran 5 = data; 6 = rcv ; 7 = prg 8 = dis 9 - 14 = reserved 15 = reserved the state of the card when receiving the command. if the command execution causes a state change, it will be visible to the host in the response to the next command. the four bits are interpreted as a binary coded number between 0 and 15. b 8 ready_for_data s x ?0?= not ready ?1?= ready corresponds to buffer empty signaling on the bus a 7,6 reserved 5 app_cmd s r ?0? = disabled ?1? = enabled the card will expect acmd, or indication that the command has been inter preted as acmd c 4 reserved y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 62 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification bits identifier type value description clear condi - tion 3 ake_seq_error e r ?0? = no error ?1? = error error in the sequence of authenti cation process 2,1,0 reserved table 6 - 1 9 : card status the following table defin es for each command responded by a r1 response the affected bits in the status field. an ?x? means the error/status bit may be set in the response to the respective command. cmd# response format 1 status bit # 31 30 29 28 27 26 25 24 23 22 21 20 1 9 18 17 16 15 14 13 12 :9 8 5 3 x x x x 6 x x x x x x x x x x 7 x x x x x x x x x x x x x x x x x 12 x x x x x x x x x x x x x 13 x x x x x x x x x x x x x x x x x x 16 x x x x x x x x x x x x x x x x x 17 x x x x x x x x x x x x x x x x x x 18 x x x x x x x x x x x x x x x x x x 24 x x x x x x x x x x x x x x x x x x x x 25 x x x x x x x x x x x x x x x x x x x x 26 x x x x x x x x x x x x x x x x 27 x x x x x x x x x x x x x x x x 28 x x x x x x x x x x x x x x x x x 29 x x x x x x x x x x x x x x x x x 30 x x x x x x x x x x x x x x x x x 32 x x x x x x x x x x x x x x x x x x 33 x x x x x x x x x x x x x x x x x x 38 x x x x x x x x x x x x x x x x x 42 x x x x x x x x x x x x x x x x 55 x x x x x x x x x x x x x x x x x 56 x x x x x x x x x x x x x x x x x x acmd 6 x x x x x x x x x x x x x x x x x x acmd 13 x x x x x x x x x x x x x x x x x y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 63 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification cmd# response format 1 status bit # 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 :9 8 5 acmd 22 x x x x x x x x x x x x x x x x x acmd 23 x x x x x x x x x x x x x x x x x acmd 42 x x x x x x x x x x x x x x x x x acmd 51 x x x x x x x x x x x x x x x x x table 6 - 18 : card status f ield / command - cross reference 6.5.2 mciro sd status the micro sd status contains status bits that are related to the mcrio sd card proprietary features and may be used for future application specific usage. the size of the mcrio sd status is one data block of 51 2bit. the content of this register is transmitted to the host over the dat bus along with 16 bit crc. the sd status is sent to the host over the dat bus if acmd13 is sent (cmd55 followed with cmd13). acmd13 can be sent to a card only in ? tran_state? (card is selected). mcrio sd status structure is described in bellow. the same abbreviation for ?type? and ?clear condition? were used as for the card status above. bits identifier type value description clear condi - ti on 511: 510 dat_bus_width s r ?00 ?= 1 (default) ?01?= reserved ?10?= 4 bit width ?11?= reserved shows the currently defined data bus width that was defined by set_bus_width command a 509 secured_mode s r ?0?= not in the mode ?1?= in secured mode card is in secured mode of oper ation a 508: 496 reserved 495: 480 sd_card_type sr ? 00xxh?= sd memory cards as defined in physical spec ver1.01 - 2.00 (?x?=don?t care). the following cards are currently defined: ? 0000?= regular sd rd/wr card. ? 0001?= sd rom card in the future, the 8 lsbs will be used to define different variations of an sd memory card (each bit will define different sd types). the 8 msbs will be used to define sd cards that do not comply with current a 479: 448 size_of_protec ted_area sr in units of mult*bl ock_len refer to csd register the actual area = (size_of_protected_area) * mult * block_len. a y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 64 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification 447: 440 speed_class sr speed class of the card (see below) (see below) a 439: 432 performance_m ove sr performance of move indicated by 1 [mb/s] step. (see below) (see below) a 431: 428 au_size sr size of au (see below) (see below) a 427: reserved 424 423: 408 erase_size sr number of aus to be erased at a time (see below) a 407: 402 erase_timeout sr timeout value for erasing areas specified by unit_of_erase_au (see below) a 401: 400 erase_offset sr fixed offset value added to erase time. (see below) a 399:312 reserved 311:0 reserved table 6 - 19: micro sd card status ? size_of_protected_area setting thi s field differs between standard and high capacity cards. in the case of a standard capacity card, the capacity of protected area is calculated as follows: protected area = size_of_protected_area_* mult * block_len. size_of_protected_area is specified by t he unit in mult*block_len. in the case of a high capacity card, the capacity of protected area is specified in this field: protected area = size_of_protected_area size_of_protected_area is specified by the unit in byte. ? speed_class this 8 - bit field indi cates the speed class and the value can be calculated by pw/2. speed_class value definition 00h class 0 01h class 2 02h class 4 03h class 6 04h ? ffh reserved table 6 - 20 : speed class code field ? performance_move this 8 - bit field indicates pm and the value can be set by 1 [mb/sec] step. if the card does not move used rus, pm should be considered as infinity. setting to ffh means infinity. the minimum value of pm y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 65 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification is defined by in table 6- 21. performance_move value definition 00 h not defined 01h 1 [mb/sec] 02h 2 [mb/sec] ....... ...... feh 254 [mb/sec] ffh infinity table 6 - 21 : performance move field ? au_size this 4 - bit field indicates au size and the value can be selected in power of 2 from 16 kb. au_size va lue definition 0h not defined 1h 16 kb 2h 32 kb 3h 64 kb 4h 128 kb 5h 256 kb 6h 512 kb 7h 1 mb 8h 2 mb 9h 4 mb ah ? fh reserved table 6 - 2 2 : au_size field the maximum au size, depends on the card capacity, is defined in table 6- 23. the card can set any au size between ru size and maximum au size. capacity 16 mb ? 64 mb 128 mb - 256 mb 512 mb 1 gb ? 32 gb maximum au size 512 kb 1 mb 2 mb 4 mb table 6 - 2 3 : maximum au size ? erase_size this 16 - bit field indicat es nerase. when nerase numbers of aus are erased, the timeout value is specified by erase_timeout (refer to erase_timeout). the host should determine proper number of aus to be erased in one operation so that the host can indicate progress of erase operati on. if this field is set to 0, the erase timeout calculation is not supported. y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 66 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification erase_size value definition 0000h erase time - out calculation is not supported. 0001h 1 au 0002 2 au 0003 3 au ....... ....... ffffh 65535 au table 6 - 2 4 : er ase size field ? erase_timeout this 6 - bit field indicates the terase and the value indicates erase timeout from offset when multiple aus are erased as specified by erase_size. the range of erase_timeout can be defined as up to 63 seconds and the card ma nufacturer can choose any combination of erase_size and erase_timeout depending on the implementation. once erase_timeout is determined, it determines the erase_size. the host can determine timeout for any number of au erase by the equation (6). refer t o 4.14 for the concept of calculating erase timeout. if erase_size field is set to 0, this field shall be set to 0. erase_timeout value definition 00 erase time - out calculation is not supported. 01 1 [sec] 02 2 [sec] 03 3 [sec] ....... ... .... 63 63 [sec] table 6 - 2 4: erase timeout field ? erase_offset this 2 - bit field indicates the toffset and one of four values can be selected. the erase offset adjusts the line by moving in parallel on the upper side. refer to figure 4 - 33 and equat ion (6) in 4.14. this field is meaningless if erase_size and erase_timeout fields are set to 0. erase_offset value definition 0h 0 [sec] 1h 1 [sec] 2h 2 [sec] 3h 3 [sec] table 6 - 25 : erase offset field formatted: centered formatted: font: 10 pt formatted table formatted: font: (default) times new roman, 10 pt formatted: font: (default) times new roman, 10 pt formatted: font: (default) times new roman, 10 pt formatted: font: (default) times new roman, 10 pt formatted: font: (default) times new roman, 10 pt formatted: font: (default) times new roman, 10 pt formatted: centered formatted: font: 10 pt formatted table formatted: font: (default) times new roman, 10 pt formatted: font: (default) times new roman, 10 pt formatted: font: (default) times new roman, 10 pt formatted: font: (default) times new roman, 10 pt formatted: centered o o u u r r l l t t i i m m a a t t e e e e m m o o r r y y s s o o l l u u t t i i o o n n 67 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification 6.6 card identification mode and data tr ansfer mode two operation modes are defined for the sd card system: ? card identification mode the host will be in card identification mode after reset and while it is looking for new cards on the bus. cards will be in this mode after reset until the send_ rca command (cmd3) is received. ? data transfer mode cards will enter data transfer mode once their rca is first published. the host will enter data transfer mode after identifying all the cards on the bus. the following table shows the dependencies betwe en operation modes and card states. each state in the sd card state diagram (see figure 6- 8 ) is associated with one operation mode: card state operation mode inactive state inactive idle state card identification mode ready state identificatio n state stand - by state data transfer mode transfer state sending - data state receive - data state programming state disconnect state table 6 - 20 2 6 : overview of card states vs. operation modes while in card identification mode the host res ets all the cards that are in card identification mode, validates operation voltage range, identifies cards and asks them to publish relative card address (rca). this operation is done to each card separately on its own cmd line. all data communication in the card identification mode uses the command line (cmd) only. 6.6.1 card identification mode while in card identification mode the host resets all the cards that are in card identification mode, validates operation voltage range, identifies cards and asks them to publish relative card address (rca). this operation is done to each card separately on its own cmd line. all data communication in the card identification mode uses the command line (cmd) only. during the card identification process, the card shall ope rate in the sd clock frequency of the identification clock rate f od . the command go_idle_state (cmd0) is the software reset command and sets each card into idle state regardless of the current card state. cards in inactive state are not affected by this command. formatted: font: (default) times new roman, 12 pt formatted: font: (default) times new roman, 12 pt formatted: font: (default) times new roman, 12 pt formatted: font: (default) times new roman, 12 pt formatted: font: (default) times new roman, 12 pt formatted: font: (default) times new roman, 12 pt o o u u r r l l t t i i m m a a t t e e e e m m o o r r y y s s o o l l u u t t i i o o n n 68 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification after power - on by the host, all cards are in idle state, including the cards that have been in inactive state before. after power - on or cmd0, all cards? cmd lines are in input mode, waiting for start bit of the next command. the cards are initiali zed with a default relative card address (rca=0x0000) and with a default driver stage register setting (lowest speed, highest driving current capability). at the start of communication between the host and the card, the host may not know the card supporte d voltage and the card may not know whether it supports the current supplied voltage. the host issues a reset command (cmd0) with a specified voltage while assuming it may be supported by the card. to verify the voltage, a following new command (cmd8) is d efined in the physical layer specification version 2.00. send_if_cond (cmd8) is used to verify sd memory card interface operating c ondition. the card checks the validity of operating condition by analyzing the argument of cmd8 and the host checks the valid ity by analyzing the response of cmd8. the supplied voltage is indicated by vhs filed in the argument. the card assumes the voltage specified in vhs as the current supplied voltage. only 1 - bit of vhs shall be set to 1 at any given time. both crc and check pattern are used for the host to check validity of communication between the host and the card. if the card can operate on the supplied voltage, the response echoes back the supply voltage and the check pattern that were set in the command argument. if the card cannot operate on the supplied voltage, it returns no response and stays in idle state. it is mandatory to issue cmd8 prior to first acmd41 for initialization of high capacity sd memory card (see figure 6- 27 ) . receipt of cmd8 makes the cards realize that the host supports the physical layer version 2.00 and the card can enable new functions. it is also mandatory for low - voltage host to send cmd8 before acmd41. in case that a dual voltage card is not receiving cmd8 the card will work as a high - voltage only card, and in this case that a low voltage host didn't send cmd8 the card will go to inactive at acmd41. sd_send_op_cond (acmd41) is designed to provide sd m emory card hosts with a mechanism to identify and reject cards which do not match the vdd range desired by the host. this is accomplished by the host sending the required vdd voltage window as the operand o f this command . cards which cannot perform data transfer in the specified range shall discard themselves from further bus operations and go into inactive state. the levels in the ocr register shall be defined accordingly. note that acmd41 is application specific command, therefore app_cmd (cmd55) shall always precede acmd41. the rca to be used for cmd55 in idle_state shall be the card?s default rca = 0x0000. after the host issues a reset command (cmd0) to reset the card, the host shall issue cmd8 prior to acmd41 to re - initialize the sd memory card. the host starts the card identification process with the identification clock rate f od . the command g o_idle_state (cmd0) is the software reset command and sets each card into idle state regardless of the current card state. cards in inactive state are not affected by this command. after power - on by the host, all cards are in idle state , including the card s that have been in inactivestate before. formatted: font: (default) times new roman, 12 pt y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 69 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification formatted: centered y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 70 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 71 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification figure 6 - 8 2 7 : micro sd card state diagram (card identification mode) after the bus is activated the host will request the cards to send their valid operation conditions (acmd41 preceding with app_cmd - cmd55 w ith rca=0x0000). the response to acmd41 is the operation condition register of the card. the host then issues the command all_send_cid (cmd2), to each card to get its unique card identification (cid) number. card that is unidentified (i.e. which is in rea dy state ) sends its cid number as the response (on the cmd line). after the cid was sent by the card it goes into identification state . there after, the host issues cmd3 (send_relative_addr) asks the card to publish a new relative card address (rca), which is shorter than cid and which will be used to address the card in the future data transfer mode (typically with a higher clock rate than fod). once the rca is received the card state changes to the stand - by state. the host repeats the identification proce ss, i.e. the cycles with cmd2 and cmd3 for each card in the system. by setting the ocr to zero in the argument of acmd41, the host can query each card and determine the common voltage range before sending out - of - range cards into the inactive state (query mode). this query should be used if the host is able to select a common voltage range or if a notification to the application of non usable cards in the stack is desired. the card does not start initialization if acmd41 is issued as a query. afterwards, th e host may choose a voltage for operation and reissue acmd41 formatted: (asian) japanese formatted: (asian) japanese formatted: (asian) japanese formatted: (asian) japanese formatted: font: not italic formatted: (asian) japanese formatted: font: not italic formatted: (asian) japanese formatted: (asian) japanese formatted: (asian) japanese formatted: (asian) japanese formatted: font: not italic formatted: (asian) japanese formatted: (asian) japanese formatted: font: (default) times new roman, 12 pt, (asian) japanese formatted: font: (default) times new roman, 12 pt, (asian) japanese formatted: font: (default) times new roman, 12 pt, not italic, (asian) japanese formatted: font: (default) times new roman, 12 pt, (asian) japanese formatted: font: (default) times new roman, 12 pt, (asian) japanese formatted: font: (default) times new roman, 12 pt, (asian) japanese formatted: font: (default) times new roman, 12 pt, (asian) japanese y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 72 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification with this condition, sending incompatible cards into the inactive state. during the initialization procedure, the host is not allowed to change the operating voltage range. after the bus is acti vated the host starts card initialization and identification process (see figure 6- 2 8). the initialization process starts with sd_send_op_cond (acmd41) by setting its operational conditions and the hcs bit in the ocr. the hcs (host capacity support) bit se t to 1 indicates that the host supports high capacity sd memory card. the hcs (host capacity support) bit set to 0 indicates that the host does not support high capacity sd memory card. receiving of cmd8 expands the acmd41 function; hcs in the argument and ccs (card capacity status) in the response. hcs is ignored by cards, which didn?t respond to cmd8. however the host should set hcs to 0 if the card returns no response to cmd8. standard capacity sd memory card ignores hcs. if hcs is set to 0, high capacit y sd memory card never return ready statue (keep busy bit to 0). the busy bit in the ocr is used by the card to inform the host that initialization of acmd41 is completed. setting the busy bit to 0 indicates that the card is still initializing. setting the busy bit to 1 indicates completion of initialization. the host repeatedly issues acmd41 until the busy bit is set to 1. the card checks the operational conditions and the hcs bit in the ocr only at the first acmd41. while repeating acmd41, the host shall not issue another command except cmd0. if the card responds to cmd8, the response of acmd41 includes the ccs field information. ccs is valid when the card returns ready (the busy bit is set to 1). ccs=1 means that the card is a high capacity sd memory card . ccs=0 means that the card is a standard capacity sd memory card. the host performs the same initialization sequence to all of the new cards in the system. incompatible cards are sent into inactive state . the host then issues the command all_send_cid (cmd 2), to each card to get its unique card identification (cid) number. card that is unidentified (i.e. which is in ready state ) sends its cid number as the response (on the cmd line). after the cid was sent by the card it goes into identification state . ther eafter, the host issues cmd3 (send_relative_addr) asks the formatted: font: (default) times new roman, 12 pt, (asian) japanese formatted: font: (default) times new roman, 12 pt, not italic, (asian) japanese formatted: font: (default) times new roman, 12 pt, (asian) japanese formatted: font: (default) times new roman, 12 pt, (asian) japanese formatted: font: (default) times new roman, 12 pt, (asian) japanese formatted: font: (default) times new roman, 12 pt, (asian) japanese formatted: font: (default) times new roman, 12 pt, (asian) japanese formatted: font: (default) times new roman, 12 pt, not italic, (asian) japanese formatted: font: (default) times new roman, 12 pt, (asian) japanese formatted: font: (default) times new roman, 12 pt, not italic, (asian) japanese formatted: font: (default) times new roman, 12 pt, (asian) japanese formatted: font: (default) times new roman, 12 pt, not italic, (asian) japanese formatted: font: (default) times new roman, 12 pt, (asian) japanese y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 73 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification card to publish a new relative card address (rca), which is shorter than cid and which is used to address the card in the future data transfer mode. once the rca is received the card state changes to the stand - by state. at this point, if the host wants to assign another rca number, it can ask the card to publish a new number by sending another cmd3 command to the card. the last published rca is the actual rca number of the card. the host repeats th e identification process, i.e. the cycles with cmd2 and cmd3 for each card in the system. formatted: font: (default) times new roman, 12 pt, (asian) japanese formatted: font: (default) times new roman, 12 pt, not italic, (asian) japanese formatted: font: (default) times new roman, 12 pt, (asian) japanese y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 74 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 75 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification figure 6 - 8 2 8 : card initialization and identification flow (sd mode) 6.6.2 data transfer mode until the end of card identification mode the host must remain at f od fre quency because some cards may have operating frequency restrictions during the card identification mode. in data transfer mode the host may operate the card in f pp frequency range. the host issues send_csd (cmd9) to obtain the card specific data (csd regis ter), e.g. block length, card storage capacity, etc. cmd7 is used to select one card and put it into the transfer state . when cmd7 is issued with the reserved relative card address ?0x0000?, all cards are put back to stand - by state (note that it is the re sponsibility of the host to reserve the rca=0 for card de - selection ). y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 76 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 77 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification figure 6 - 2 9: micro sd card state diagram (data transfer mode) y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 78 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification 6.7 error handling to correct defects in the memory field inside card the card include error correction codes in the payload data (ecc). this correction is intended to correct static errors. additionally two methods of detecting errors generated during the data transfer (dynamic errors) via a cyclic redundancy check (crc) are implemented 6.7.1 e rror c orrection c ode (ecc) the atp sd card is free of static errors. all errors are covered inside the card, even errors occurring during the lifetime of the card are covered for the user. the only effect which may be notified by the end user is, that the overall memory capacity ma y be reduced by small number of blocks. all flash handling is done on card, so that no external error correction is needed. 6.7.2 cyclic redundancy c heck (crc) the crc is intended for protecting sd card commands, responses and data transfer against transmissi on errors on the sd card bus. one crc is generated for every command and checked for every response on the cmd line. for data blocks one crc per transferred block is generated. the crc is generated and checked as described in the following. ? crc7 the crc 7 check is used for all commands, for all responses except type r3, and for the csd and cid registers. the crc7 is a 7 - bit value and is computed as follows: generator polynomial: g(x) = x 7 + x 3 + 1. m(x) = (first bit) * x n + (second bit) * x n - 1 +...+ (last bit) * x 0 crc[6...0] = remainder [(m(x) * x 7 ) / g(x)] the first bit is the most left bit of the corresponding bitstring (of the command, response, cid or csd). the degree n of the polynomial is the number of crc protected bits decreased by one. the number of bits to be protected is 40 for commands and responses (n = 39), and 120 for the csd and cid (n = 119). ? crc16 i n case of one dat line usage (as in multimediacard) than the crc16 is used for payload protection in block transfer mode. the crc check sum is a 16 - bit value and is computed as follows: generator polynomial g(x) = x 16 +x 12 +x 5 +1 m(x) = (first bit) * x n + (second bit)* x n - 1 +...+ (last bit) * x 0 crc[15...0] = remainder [(m(x) * x 16 ) / g(x)] y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 79 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification the first bit is the first data bit of the correspon ding block. the degree n of the polynomial denotes the number of bits of the data block decreased by one (e.g. n = 4095 for a block length of 512 bytes). the generator polynomial g(x) is a standard ccitt polynomial. the code has a minimal distance d=4 and is used for a payload length of up to 2048 bytes (n <= 16383). the same crc16 method is used in single dat line mode and in wide bus mode. in wide bus mode, the crc16 is done on each line separately . 6.7.3 crc and illegal command all commands are protected by c rc (cyclic redundancy check) bits. if the addressed card?s crc check fails, the card does not respond and the command is not executed. the card does not change its state, and com_crc_error bit is set in the status register. similarly, if an illegal command has been received, the card will not change its state, will not response and will set the illegal_command error bit in the status register. only the non - errodata neous state branches are shown in the state diagrams contains a complete state transition des cription. there are different kinds of illegal commands: ? commands which belong to classes not supported by the card (e.g. write commands in read only cards). ? commands not allowed in the current state (e.g. cmd2 in transfer state). ? commands which are not defined (e.g. cmd5). 6.7.4 read, write and erase time - out the times after which a time - out condition for read operations occurs are (card independent) either 100 times longer than the typical access times for these operations given below or 100ms (the lower of them) . the times after which a time - out condition for write/erase operations occurs are (card independent) either 100 times longer than the typical program times for these operations given below or 250ms (the lower of them). a card shall complete the c ommand within this time period, or give up and return an error message. if the host does not get any response with the given time out it should assume the card is not going to respond anymore and try to recover (e.g. reset the card, power cycle, reject, et c.). the typical access and program times are defined as follows: ? read the read access time is defined as the sum of the two times given by the csd parameters taac and nsac . these card parameters define the typical delay between the end bit of the read command and the start bit of the data block. this number is card dependent and should be used by the host to calculate throughput and the maximal frequency for stream read. ? write y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 80 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification the r2w_factor field in the csd is used to calculate the typical block pro gram time obtained by multiplying the read access time by this factor. it applies to all write/erase commands (e.g. set(clr)_write_protect, program_csd and the block write commands). ? erase the duration of an erase command will be (order of magnitude) the number of write blocks (write_bl) to be erased multiplied by the block write delay. y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 81 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification 7 spi mode 7.1 introduction the spi mode consists of a secondary communication protocol which is offered by sd card s. this mode is a subse t of the sd card protocol, designed to communicate with a spi channel, the interface is selected during the first reset command after power up (cmd0) and cannot be changed once the part is powered on. 7.2 spi b us topology the atp sd card spi interface is co mpatible with spi hosts available on the market. as any other spi device the atp sd card spi channel consists of the following four signals: cs: host to card chip select signal. clk: host to card clock signal datain: host to card data signal. dataout: card to host data signal. another spi common characteristic are byte transfers, which is implemented in the card as well. all data tokens are multiples of bytes (8 bit) and always byte aligned to the cs signal. the card identification and addressing meth ods are replaced by a hardware chip select (cs) signal. there are no broadcast commands. for every command, a card (slave) is selected by asserting (active low) the cs signal (see figure 7 - 1). the cs signal must be continuously active for the duration of t he spi transaction (command, response and data). the only exception occurs during card programming, when the host can deassert the cs signal without affecting the programming process. the spi interface uses the 7 out of the sd 9 signals (dat1 and dat 2 are not used, dat3 is the cs signal) of the sd bus. y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 82 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification figure 7 - 1 : sd card system (spi mode) bus topology 7.3 spi bus protocol while the sd memory card channel is based on command and data bit streams that are initiated by a start bit and terminated by a stop bit, the spi channel is byte oriented. every command or data block is built of 8 - bit bytes and is byte aligned to the cs signal (i.e. the length is a multiple of 8 clock cycles). the card starts to count spi bus clock cycle at the assertion of the cs signa l. every command or data token shall be aligned to 8 - clock cycle boundary. similar to the sd memory card protocol, the spi messages consist of command, response and datablock tokens. all communication between host and c ards is controlled by the host (maste r). the host starts every bus transaction by asserting the cs signal low. the selected card always responds to the command as opposed to the sd mode. when the card encounters a data retrieval problem in a read operation, it will respond with an error respo nse (which replaces the expected data block) rather than by a timeout as in the sd mode. additionally, every data block sent to the card during write operations will be responded with a data response token. in the case of a standard capacity memory card, a data block can be as big as one card write block and as small as a single byte. partial block read/write operations are enabled by card options specified in the csd register. in the case of a high capacity sd memory card, the size of data block is fixed t o 512 bytes. the block length set by cmd16 is only used for cmd42 and not used for memory data transfer. y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 83 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification so, partial block read/write operations are also disabled. furthermore, write protected commands (cmd28, cmd29 and cmd30) are not supported. figure 7 - 2 : spi mode initialization flow 7.3.1 mode selection and initialization the sd card is powered up in the sd mode. it will enter spi mode if the cs signal is asserted (negative) during the reception of the reset command (cmd0). if the card recognizes that th e sd mode is required it will not respond to the command and remain in the sd mode. if spi mode is required, the card will switch to spi and respond with the spi mode r1 response. the only way to return to the sd mode is by entering the power cycle. in spi mode, the sd card protocol state machine in sd mode is not observed. all the sd card commands supported in spi mode are always available. figure 7 - 3 shows the initialization sequence of spi mode. send_if_cond (cmd8) is used to verify sd memory card interf ace operating condition. the argument format of cmd8 is the same as defined in sd mode and the response format of cmd8 is defined in section 7.3.2.6. the card checks the validity of operating condition by analyzing the argument of cmd8 and the host checks the validity by analyzing the response of cmd8. the supplied voltage is indicated by vhs filed in the argument. the y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 84 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification card assumes the voltage specified in vhs as the current supplied voltage. only 1- bit of vhs shall be set to 1 at any given time. check patt ern is used for the host to check validity of communication between the host and the card. if the card indicates an illegal command, the card is legacy and does not support cmd8. if the card supports cmd8 and can operate on the supplied voltage, the respon se echoes back the supply voltage and the check pattern that were set in the command argument. if vca in the response is set to 0, the card cannot operate on the supplied voltage. if check pattern is not matched, cmd8 communication is not valid. in this ca se, it is recommended to retry cmd8 sequence. figure 7 - 3 : spi mode initialization flow read_ocr (cmd58) is designed to provide sd memory card hosts with a mechanism to identify cards that do not match the vdd range desired by the host. if the host does not accept voltage range, it shall not proceed further initialization sequence. the levels in the ocr register shall be defined accordingly . sd_send_op_cond (acmd41) is used to start initialization and to check if the card has completed initialization. it is mandatory to issue cmd8 prior to the first acmd41. receiving of cmd8 expands the cmd58 and acmd41 function; hcs (high capacity support) in the argument of acmd41 and ccs (card capacity status) in the response of cmd58. hcs is ignored by the card, y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 85 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification which didn?t accept cmd8. standard capacity sd memory card ignores hcs. the ?in idle state? bit in the r1 response of acmd41 is used by the card to inform the host if initialization of acmd41 is completed. setting this bit to ?1? indicates that the card is still initializing. setting this bit to ?0? indicates completion of initialization. the host repeatedly issues acmd41 until this bit is set to ?0?. the card checks the hcs bit in the ocr only at the first acmd41. while repeating acmd41, the host shall not issue another command except cmd0. after initialization is completed, the host should get ccs information in the response of cmd58. ccs is valid when the card accepted cmd8 and after the completion of initialization. ccs=1 means that the card is a high capacity sd memory card. ccs=0 means that the card is a standard capacity sd . 7.3.2 bus transfer protection every sd card token transferred on the bus is protected by crc bits. in spi mode, the sd card offers a non protected mode which enables systems built with reliab le data links to exclude the hardware or firmware required for implementing the crc generation and verification functions. in the non - protected mode the crc bits of the command, response and data tokens are still required in the tokens. however, they are d efined as ?don?t care? for the transmitter and ignored by the receiver. the spi interface is initialized in the non - protected mode. however, the reset command (cmd0) which is used to switch the card to spi mode, is received by the card while in sd mode and , therefore, must have a valid crc field. since cmd0 has no arguments, the content of all the fields, including the crc field, are constants and need not be calculated in run time. a valid reset command is: 0x40, 0x0, 0x0, 0x0, 0x0, 0x95 the host can tu rn the crc option on and off using the crc_on_off command (cmd59). 7.3.3 data read the spi mode supports single block read and multiple block read operations (cmd17 or cmd18 in the sd card protocol). upon reception of a valid read command the card will respond with a response token followed by a data token of the length defined in a previous set_blocklen (cmd16) command (refer to figure 7- 3). figure 7 - 3 : single block read operation y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 86 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification in case of a data retrieval error, the card will not transmit any data. instea d, a special data error token will be sent to the host. figure 7- 4 shows a data read operation which terminated with an error token rather than a data block. figure 7 - 4 : read operation - data error in case of multiple block read operation every transfer red block has its suffixed of 16 bit crc. stop transmission command (cmd12) will actually stop the data transfer operation (the same as in sd card operation mode). figure 7 - 5 : multiple block read operation 7.3.4 data write in spi mode the sd card supports si ngle block and multiple block write commands. upon reception of a valid write command (cmd24 or cmd25 in the sd card protocol), the card will respond with a response token and will wait for a data block to be sent from the host. crc suffix, block length an d start address restrictions are (with the exception of the csd parameter write_bl_partial controlling the partial block write option) identical to the read operation. y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 87 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification figure 7 - 6 : single block write operation every data block has a prefix of ?start blo ck? token (one byte). after a data block has been received, the card will respond with a data - response token. if the data block has been received without errors, it will be programmed. as long as the card is busy programming, a continuous stream of busy t okens will be sent to the host (effectively holding the dataout line low). in multiple block write operation the stop transmission will be done by sending ?stop tran? token instead of ?start block? token at the beginning of the next block. in case of writ e error indication (on the data response) the host shall use send_num_wr_blocks (acmd22) in order to get the number of well written write blocks. figure 7 - 7 : multiple block write operation while the card is busy, resetting the cs signal will not terminat e the programming process. the card will release the dataout line (tri - state) and continue with programming. if the card is reselected before the programming is finished, the dataout line will be forced back to low and all commands will be rejected. resett ing a card (using cmd0) will terminate any pending or active programming operation. this may destroy the data formats on the card. it is in the responsibility of the host to prevent it. 7.3.5 erase & write protect management the erase and write protect managem ent procedures in the spi mode are identical to those of the sd mode. while the card is erasing or changing the write protection bits of the predefined sector list, it will y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 88 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification be in a busy state and hold the dataout line low. figure 7- 8 illustrates a ?no data ? bus transaction with and without busy signaling. figure 7 - 8 : ?no data? operations 7.3.6 read cid/csd registers unlike the sd card protocol (where the register contents is sent as a command response), reading the contents of the csd and cid registers in spi mode is a simple read - block transaction. the card will respond with a standard response token followed by a data block of 16 bytes suffixed with a 16 bit crc. the data time out for the csd command cannot be set to the cards taac since this value is stored in the card?s csd. therefore the standard response time - out value (ncr) is used for read latency of the csd register. 7.3.7 reset sequence the sd card requires a defined reset sequence. after power on reset or cmd0 (software reset) the card enters an idle stat e. at this state the only valid host commands are acmd41 (sd_send_op_cond), cmd58 (read_ocr) and cmd59 (crc_on_off). cmd1 (send_op_cond) is also valid - that means that in spi mode cmd1 and acmd41 have the same behavior. after power on, once the card acce pted valid acmd41, it will be able to accept also cmd1 even if used after re - initializing (cmd0) the card. the host must poll the card (by repeatedly sending cmd1 or acmd41) until the ?in - idle - state? bit in the card response indicates (by being set to 0) that the card completed its initialization processes and is ready for the next command. in spi mode, as opposed to sd mode, acmd41 (or cmd1 as well) has no operands and does not return the contents of the ocr register. instead, the host may use cmd58 (available in spi mode only) to read the ocr register. furthermore, it is in the responsibility of the host to refrain from accessing cards that do not support its voltage range. the usage of cmd58 is not restricted to the initializing phase only, bu t can be issued at any time. y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 89 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 90 atp confidential & proprietary
revision 3.3 atp industrial grade micro sd card specification y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 91 atp confidential & proprietary


▲Up To Search▲   

 
Price & Availability of AF512UDI

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X